home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -e
-
- # If the user has removed the config file, respect this sign of dementia
- # -- only create on package install.
-
- if [ "$2" = "1.0.1-2ubuntu1" ]; then
- sed -i -e'
- /here.s the fallback if no module succeeds/,/prime the stack/ {
- s/.*pam_deny.*/# this is obviously a completely redundant line, except that it lets us\
- # handle better the case where there are no "Primary" modules provided\
- session required pam_permit.so/
- }' /etc/pam.d/common-session
- fi
-
- force=
- if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-2ubuntu1
- then
- force=--force
- for configfile in common-auth common-account common-session \
- common-password
- do
- if [ -f /etc/pam.d/$configfile ] && \
- ! fgrep -q `md5sum /etc/pam.d/$configfile` \
- /usr/share/pam/$configfile.md5sums 2>/dev/null
- then
- force=
- fi
- done
- fi
-
- pam-auth-update --package $force
-
- if [ -n "$force" ]; then
- rm -f /etc/pam.d/common-auth.pam-old \
- /etc/pam.d/common-account.pam-old \
- /etc/pam.d/common-password.pam-old \
- /etc/pam.d/common-session.pam-old
- fi
-
-
-